<template>
  <BaseContainer>
    <aplid-base-crud ref="crud" class="w-100" v-bind="{...baseConfig,...$attrs }" >
      <template v-slot:ArchivesDialog="{ row, show }">
        <Archives @refresh="handleRefresh" @refreshPage="handleRefreshPage" @rechange="handleOperate"
          :api="baseConfig.api" :key="show" :nowRowData="row"></Archives>
      </template>
    </aplid-base-crud>
  </BaseContainer>
</template>

<script setup lang="ts">
import { nextTick,ref } from 'vue'
import { baseConfig } from './config'

import Archives from '@/views/datacenter/basicData/serviceOrg/components/Archives/index.vue'

const crud = ref()
const dialogVisible = ref(false)
const handleRefresh = (query, visible = false) => {
  dialogVisible.value = visible
  nextTick(() => {
    crud.value.refreshChange(query)
  })
}
const handleOperate = (type, row, title) => {
  nextTick(() => {
    crud.value.handleOperate(type, row, title)
  })
}
const handleRefreshPage = () => {
  nextTick(() => {
    crud.value.refreshChange({}, true)
  })
}
const setToggleSelection = (data)=> {
  crud.value.setToggleSelection(data)
}
onMounted(()=>{
 
})
defineExpose({
  setToggleSelection
})
</script>

<style scoped></style>
